Imports System.ComponentModel
Imports System.Web.UI

<System.Web.UI.WebControls.WebParts.WebPartTransformer(GetType(IBookInfo), GetType(IAuthorInfo))> _
Public Class BookToAuthorTransform
    Inherits System.Web.UI.WebControls.WebParts.WebPartTransformer
    Implements IAuthorInfo

    Dim ibk As IBookInfo

    
    Public Overrides Function Transform(ByVal providerData As Object) As Object
        ibk = CType(providerData, IBookInfo)
        Return Me
    End Function

    Property ISBN() As Integer Implements IAuthorInfo.ISBN
        Get
            If (Not (ibk) Is Nothing) Then
                Return Convert.ToInt32(ibk.ISBN)
            End If
        End Get

        Set(ByVal value As Integer)
            ibk.ISBN = value.ToString
        End Set

    End Property

End Class
